package com.sc.study.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sc.study.exam.mapper.ScQuestionTypeMapper;
import com.sc.study.exam.domain.ScQuestionType;
import com.sc.study.exam.service.IScQuestionTypeService;

/**
 * 问题Service业务层处理
 * 
 * @author sc
 * @date 2022-02-27
 */
@Service
public class ScQuestionTypeServiceImpl implements IScQuestionTypeService 
{
    @Autowired
    private ScQuestionTypeMapper scQuestionTypeMapper;

    /**
     * 查询问题
     * 
     * @param id 问题主键
     * @return 问题
     */
    @Override
    public ScQuestionType selectScQuestionTypeById(Long id)
    {
        return scQuestionTypeMapper.selectScQuestionTypeById(id);
    }

    /**
     * 查询问题列表
     * 
     * @param scQuestionType 问题
     * @return 问题
     */
    @Override
    public List<ScQuestionType> selectScQuestionTypeList(ScQuestionType scQuestionType)
    {
        return scQuestionTypeMapper.selectScQuestionTypeList(scQuestionType);
    }

    /**
     * 新增问题
     * 
     * @param scQuestionType 问题
     * @return 结果
     */
    @Override
    public int insertScQuestionType(ScQuestionType scQuestionType)
    {
        return scQuestionTypeMapper.insertScQuestionType(scQuestionType);
    }

    /**
     * 修改问题
     * 
     * @param scQuestionType 问题
     * @return 结果
     */
    @Override
    public int updateScQuestionType(ScQuestionType scQuestionType)
    {
        return scQuestionTypeMapper.updateScQuestionType(scQuestionType);
    }

    /**
     * 批量删除问题
     * 
     * @param ids 需要删除的问题主键
     * @return 结果
     */
    @Override
    public int deleteScQuestionTypeByIds(Long[] ids)
    {
        return scQuestionTypeMapper.deleteScQuestionTypeByIds(ids);
    }

    /**
     * 删除问题信息
     * 
     * @param id 问题主键
     * @return 结果
     */
    @Override
    public int deleteScQuestionTypeById(Long id)
    {
        return scQuestionTypeMapper.deleteScQuestionTypeById(id);
    }
}
